package com.utry.lib.annotation.data

import com.utry.lib.annotation.ComponentSign

/**
 * @description: lab
 * @author: wangxf
 * @date: 2023/5/22 10:02
 */

class ComponentData(
    var name: String,
) {
    var classPath: String = ""
    var devDepend: List<Dev>? = null;
    var afterDevs: List<Dev>? = null;
    var modulesDepend: List<Module>? = null;
    var afterModules: List<Module>? = null;
    var initMode: InitMode = InitMode.LAZY;
    var threadMode: ThreadMode = ThreadMode.ASYNC;

    companion object {
        fun copyData(componentData: ComponentData, componentSign: ComponentSign) {
            componentData.classPath = componentSign.classPath
            componentData.devDepend = componentSign.devs.toList()
            componentData.modulesDepend = componentSign.moudule.toList()
            componentData.initMode = componentSign.initMode
            componentData.threadMode = componentSign.threadMode
        }
    }
}

